<template>
	<view @click="goExpenseDetail" class="card">
		<view class="info">
			<view class="title">
				<text>{{ cardData.departmentName }}</text>
				<text>{{ cardData.doctorName }}</text>
			</view>
			<view class="person">
				<text>就诊人</text>
				<text>{{ cardData.name }}</text>
			</view>
			<view class="time">
				<text>{{ cardData.operationTime }}</text>
			</view>
		</view>
		<view class="price">
			<text>￥{{ cardData.totalMoney }}</text>
		</view>
	</view>
</template>

<script setup>
import { useLoginStore } from '@/store/loginStore.js'
const props = defineProps(['cardData'])
const loginStore = useLoginStore()
const goExpenseDetail = () => {
	loginStore.expenseData = props.cardData
	uni.navigateTo({
		url: '../../outpatientCare/expenseDetail/expenseDetail'
	})
}
</script>

<style lang="less" scoped>
.card {
	border-radius: 6px;
	margin: 24rpx 30rpx;
	padding: 40rpx 24rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 1px solid #f4f4f4;
	font-size: 24rpx;
	color: #c9bfca;

	text {
		margin-right: 16rpx;
	}

	.title {
		font-size: 32rpx;
		color: #000;
	}

	.price {
		color: red;
		font-size: 28rpx;
	}

	.person {
		margin: 16rpx 0;
	}
}
</style>
